#include <iostream>
#include <unistd.h>

int main()
{
    int pipes[2] = {0};
    int n = pipe(pipes);
    if(n < 0) std::cerr << "pipe error" << std::endl;
    std::cout << "pipes[0]:" << pipes[0] << std::endl;
    std::cout << "pipes[1]:" << pipes[1] << std::endl;
    
    return 0;
}